package cn.qdhlm.collectservice.common.config;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.annotation.Configuration;


/**
 * @Name: MongoConfig
 * @Description: MongoConfig
 * @Author: jiangcs
 */
@Configuration
public class MongoConfig {
//    @Bean
//    public MappingMongoConverter mappingMongoConverter(MongoDbFactory factory, MongoMappingContext context, BeanFactory beanFactory) {
//        DbRefResolver dbRefResolver = new DefaultDbRefResolver(factory);
//        MappingMongoConverter mappingConverter = new MappingMongoConverter(dbRefResolver, context);
//        try {
//            mappingConverter.setCustomConversions(beanFactory.getBean(CustomConversions.class));
//        } catch (NoSuchBeanDefinitionException ignore) {
//        }
//
//        // Don't save _class to mongo
//        mappingConverter.setTypeMapper(new DefaultMongoTypeMapper(null));
//
//        return mappingConverter;
//    }
}
